﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Text;
using PSI.Models;

namespace PSI.Services {
    public class SystemPropService:PSIBaseService {

        public SystemProp GetItemByPoryName(string porpname) {

            var result = new SystemProp();

            var str = new StringBuilder("select prop_name,prop_value from psi_system_prop where prop_name=@porpname");

            var p = CreateDbParameters();

            p.AddWithValue("porpname", porpname);

            Query(str.ToString(), p, ready => {

                result.PropName = ready.GetString(0);
                result.PropValue = ready.GetString(1);
            });

            return result;
        }


    }
}